import type { RouteRecordRaw } from 'vue-router';
import RouterView from '@/layout/routerView/index.vue';

const routes: RouteRecordRaw[] = [
  {
    path: 'sampleInventory',
    name: 'sampleInventory',
    component: RouterView,
    meta: {
      title: '库存管理',
      icon: 'icon-kucunguanli',
    },
    children: [
      {
        path: 'inventoryInquiry',
        name: 'inventoryInquiry',
        component: () => import('../pages/inventory-inquiry/inventory-inquiry.vue'),
        meta: {
          title: '库存信息',
        },
      },
      {
        path: 'inventoryCount',
        name: 'inventoryCount',
        component: () => import('../pages/inventory-count/inventory-count.vue'),
        meta: {
          title: '库存盘点',
        },
      },
      {
        path: 'inventoryCountDetail/:id',
        name: 'inventoryCountDetail',
        component: () => import('../pages/inventory-count/inventory-count.vue'),
        meta: {
          title: '库存盘点',
          hideInMenu: true,
          activeMenu: 'inventoryCount',
        },
      },
      {
        path: 'inventoryRecords',
        name: 'inventoryRecords',
        component: () => import('../pages/inventory-records/inventory-records.vue'),
        meta: {
          title: '盘点记录',
        },
      },
      {
        path: 'operationalStatistics',
        name: 'operationalStatistics',
        component: () => import('../pages/operational-statistics/operational-statistics.vue'),
        meta: {
          title: '操作统计',
        },
      },
      {
        path: 'sampleTraceability',
        name: 'sampleTraceability',
        component: () => import('../pages/sample-traceability/sample-traceability.vue'),
        meta: {
          title: '样本溯源',
        },
      },
      {
        path: 'historicalInventory',
        name: 'historicalInventory',
        component: () => import('../pages/historical-inventory/historical-inventory.vue'),
        meta: {
          title: '历史库存',
        },
      },
    ],
  },
];

export default routes;
